.class public Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;
.super Landroidx/recyclerview/widget/RecyclerView$Adapter;
.source "FinderAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter$a;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroidx/recyclerview/widget/RecyclerView$Adapter<",
        "Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;",
        ">;"
    }
.end annotation


# instance fields
.field private a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/android/pop/app/finder/data/FinderGroupData;",
            ">;"
        }
    .end annotation
.end field

.field private b:Landroid/content/Context;

.field private c:Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter$a;

.field private d:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;-><init>()V

    const/4 v0, -0x1

    .line 2
    iput v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->d:I

    .line 3
    iput-object p1, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->b:Landroid/content/Context;

    .line 4
    new-instance p1, Ljava/util/concurrent/CopyOnWriteArrayList;

    invoke-direct {p1}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->a:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 9
    iget v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->d:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_1

    iget-object v1, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->a:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-le v0, v1, :cond_0

    goto :goto_0

    .line 10
    :cond_0
    iget v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->d:I

    invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyItemChanged(I)V

    :cond_1
    :goto_0
    return-void
.end method

.method public a(Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter$a;)V
    .locals 0

    .line 8
    iput-object p1, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->c:Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter$a;

    return-void
.end method

.method public a(Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;I)V
    .locals 2

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->a:Ljava/util/List;

    invoke-interface {v0, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/pop/app/finder/data/FinderGroupData;

    .line 4
    iget-object v1, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->c:Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter$a;

    invoke-virtual {p1, v1}, Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;->a(Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter$a;)V

    .line 5
    invoke-virtual {p1, v0, p2}, Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;->a(Lcom/estrongs/android/pop/app/finder/data/FinderGroupData;I)V

    .line 6
    iget-object p1, v0, Lcom/estrongs/android/pop/app/finder/data/FinderGroupData;->e:Lcom/estrongs/android/pop/app/finder/data/FinderGroupData$GroupType;

    sget-object v0, Lcom/estrongs/android/pop/app/finder/data/FinderGroupData$GroupType;->Type:Lcom/estrongs/android/pop/app/finder/data/FinderGroupData$GroupType;

    if-ne p1, v0, :cond_0

    .line 7
    iput p2, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->d:I

    :cond_0
    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/estrongs/android/pop/app/finder/data/FinderGroupData;",
            ">;)V"
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    return-void
.end method

.method public getItemCount()I
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public bridge synthetic onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
    .locals 0

    .line 1
    check-cast p1, Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;

    invoke-virtual {p0, p1, p2}, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->a(Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;I)V

    return-void
.end method

.method public bridge synthetic onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
    .locals 0

    .line 1
    invoke-virtual {p0, p1, p2}, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;

    move-result-object p1

    return-object p1
.end method

.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;
    .locals 2

    .line 2
    iget-object p2, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->b:Landroid/content/Context;

    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p2

    const v0, 0x7f0c0181

    const/4 v1, 0x0

    invoke-virtual {p2, v0, p1, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    .line 3
    new-instance p2, Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;

    iget-object v0, p0, Lcom/estrongs/android/pop/app/finder/adapter/FinderAdapter;->b:Landroid/content/Context;

    invoke-direct {p2, v0, p1}, Lcom/estrongs/android/pop/app/finder/viewHolder/FinderViewHolder;-><init>(Landroid/content/Context;Landroid/view/View;)V

    return-object p2
.end method
